package org.op.service.ui;

import org.op.service.config.ConfigKeys;

//import com.l2fprod.gui.plaf.skin.Skin;
//import com.l2fprod.gui.plaf.skin.SkinLookAndFeel;

public class SkinnableUiServiceImpl extends UiServiceImpl {

	private String themePack;
	
	public void configureUI() {
		
        //UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE);
        //Options.setDefaultIconSize(new Dimension(18, 18));

        try {
        	String themeFile = getConfigService().getProperty(ConfigKeys.KEY_SKIN);
        	
        	/**
        	Skin theSkinToUse = SkinLookAndFeel.loadThemePack(themeFile);
        	SkinLookAndFeel.setSkin(theSkinToUse);
    
        	// TODO - not working with swingwt
        	UIManager.setLookAndFeel(new SkinLookAndFeel());
        	*/
        	
        	decorateFrame(Boolean.TRUE);
        	
        } catch (Exception e) {
            System.err.println("Can't set look & feel:" + e);
        }

	}
	
	public void updateSkin(String fileName) throws Exception {

    	// SkinLookAndFeel.loadThemePack(fileName);
	}
	
	public String getThemePack() {
		return themePack;
	}

	public void setThemePack(String themePack) {
		this.themePack = themePack;
	}

}
